﻿using System;
using wojilu.ORM;

namespace wojilu.Apps.Qycms.Domain
{
    [Table("ybb_city")]
    [Serializable]
    public class City : ObjectBase<City>
    {
        public City() { }

        public City(Int32 parentid, String cityname, Int32 regiontype, Int32 agencyid)
        {
            this.parentid = parentid;
            this.cityname = cityname;
            this.regiontype = regiontype;
            this.agencyid = agencyid;
            this.insert();
        }

        [TinyInt, Column(Length = 5), NotNull(""), Default(0)]
        public Int32 parentid { get; set; }

        [NotNull(""), Column(Length = 120)]
        public String cityname { get; set; }

        [TinyInt, Column(Length = 1), NotNull(""), Default(2)]
        public Int32 regiontype { get; set; }

        [Column(Length = 5), NotNull(""), Default(0)]
        public Int32 agencyid { get; set; }

    }
}
